<?php
require_once 'base.php';

clearstatcache();
if( is_file( DP_BASE_DIR . "/includes/config.php" ) ) {

	require_once DP_BASE_DIR . "/includes/config.php";

} else {
	echo "<html><head><meta http-equiv='refresh' content='5; URL=".DP_BASE_URL."/install/index.php'></head><body>";
	echo "Fatal Error. You haven't created a config file yet.<br/><a href='./install/index.php'>
		Click Here To Start Installation and Create One!</a> (forwarded in 5 sec.)</body></html>";
	exit();
}

if (! isset($GLOBALS['OS_WIN']))
	$GLOBALS['OS_WIN'] = (stristr(PHP_OS, "WIN") !== false);

// tweak for pathname consistence on windows machines
require_once DP_BASE_DIR."/includes/db_adodb.php";
require_once DP_BASE_DIR."/includes/db_connect.php";
require_once DP_BASE_DIR."/includes/main_functions.php";
require_once DP_BASE_DIR."/classes/ui.class.php";
require_once DP_BASE_DIR."/classes/permissions.class.php";
require_once DP_BASE_DIR."/includes/session.php";

dPsessionStart(array('AppUI'));
if (isset($_REQUEST['status'])) $_SESSION['Toolbar[show]'] = $_REQUEST['status'];
if (isset($_REQUEST['top'])) $_SESSION['Toolbar[top]'] = intval($_REQUEST['top']);
?>
